\hypertarget{class_ring_buffer}{\section{Ring\+Buffer类 参考}
\label{class_ring_buffer}\index{Ring\+Buffer@{Ring\+Buffer}}
}


循环缓冲类  




{\ttfamily \#include $<$Ring\+Buffer.\+h$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_ring_buffer_a20b6806b083c58dc5b6a0f0275749a35}{{\bfseries Ring\+Buffer} (uint32 ring\+Size)}\label{class_ring_buffer_a20b6806b083c58dc5b6a0f0275749a35}

\item 
sint32 \hyperlink{class_ring_buffer_a98a468b73c9826ac11cda2bbefbbfcce}{push} (const char $\ast$buf, uint32 len)
\begin{DoxyCompactList}\small\item\em 往循环缓冲放入数据 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_ring_buffer_a40b00e0857763f9d39c788f7adb0868b}{pop} (char $\ast$buf, uint32 len)
\begin{DoxyCompactList}\small\item\em 从循环缓冲取出数据 \end{DoxyCompactList}\item 
\hypertarget{class_ring_buffer_a735642a4e7374d672c10fff09c88d1ef}{void {\bfseries clear} ()}\label{class_ring_buffer_a735642a4e7374d672c10fff09c88d1ef}

\item 
\hypertarget{class_ring_buffer_a74c1b8941f14ca85ba27898d3dba46e6}{bool {\bfseries is\+Empty} ()}\label{class_ring_buffer_a74c1b8941f14ca85ba27898d3dba46e6}

\item 
\hypertarget{class_ring_buffer_a1b82f430802f81d1cbf7a6fbb374394d}{bool {\bfseries is\+Full} ()}\label{class_ring_buffer_a1b82f430802f81d1cbf7a6fbb374394d}

\end{DoxyCompactItemize}


\subsection{详细描述}
循环缓冲类 

\subsection{成员函数说明}
\hypertarget{class_ring_buffer_a40b00e0857763f9d39c788f7adb0868b}{\index{Ring\+Buffer@{Ring\+Buffer}!pop@{pop}}
\index{pop@{pop}!Ring\+Buffer@{Ring\+Buffer}}
\subsubsection[{pop}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Ring\+Buffer\+::pop (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{buf, }
\item[{uint32}]{len}
\end{DoxyParamCaption}
)}}\label{class_ring_buffer_a40b00e0857763f9d39c788f7adb0868b}


从循环缓冲取出数据 


\begin{DoxyParams}{参数}
{\em buf} & 数据缓存 \\
\hline
{\em len} & 数据缓存的长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回取出的字节数,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_ring_buffer_a98a468b73c9826ac11cda2bbefbbfcce}{\index{Ring\+Buffer@{Ring\+Buffer}!push@{push}}
\index{push@{push}!Ring\+Buffer@{Ring\+Buffer}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Ring\+Buffer\+::push (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{buf, }
\item[{uint32}]{len}
\end{DoxyParamCaption}
)}}\label{class_ring_buffer_a98a468b73c9826ac11cda2bbefbbfcce}


往循环缓冲放入数据 


\begin{DoxyParams}{参数}
{\em buf} & 数据缓存 \\
\hline
{\em len} & 要放入的数据长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回放入的字节数,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_ring_buffer_8h}{Ring\+Buffer.\+h}\item 
libemb/src/Ring\+Buffer.\+cpp\end{DoxyCompactItemize}
